package com.zuoye.zuoye3;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        ArrayList<Account>accounts=new ArrayList<>();
            Account a1=new Account("张三","123",500,100);
            Account a2=new Account("李四","456",300,100);
            Account a3=new Account("王五","789",400,100);
            accounts.add(a1);
            accounts.add(a2);
            accounts.add(a3);
        for (int i = 0; i < accounts.size(); i++) {
            System.out.println(accounts.get(i).toString());
        }
    }
}
